1. Field of the Invention
The present invention is related to a network device and a method thereof for transmitting data in a network system, and more particularly to a network device and a method thereof for transmitting a MAC service data unit (MSDU) in a network system.
2. Description of the Prior Art
In today's modern information-age society, networks allow large amounts of data, information, multimedia and knowledge, in the form of digital electronic signals to be transferred and exchanged. This promotes greater interpersonal communication, accumulation of experience, knowledge exchange, and technological advancement. Thus, networks have already become a foundation of the modern information-age society. Wired networks already having broad and almost universal acceptance, wireless networks are now also rapidly being developed. Wired networks are typically more stable and can ensure safety and privacy of information. Wireless networks, on the other hand, break free from the chains of wired transmission, allowing users to access information sources at any time and in any place, in a mobile and portable way. As wired and wireless networks each have their respective advantages, it has become a priority of information technologists to allow users to access both types of networks at a lower cost and with more effective resources for a networked device.
Please refer to FIG. 1, which is a block diagram of a wireless network device 20 connected to a terminal 10 according to the prior art. A terminal 10 connects with the wireless network device 20, which is a device following the WLAN specification of IEEE 802.11, such as a wireless network adapter or an access point. The wireless network device 20 comprises a buffer 22 for storing data, a control circuit 24 for controlling operations of the wireless network device 20, and an antenna 26 for wirelessly transmitting and receiving data.
During the period when the terminal 10 transmits data to other wireless device via the wireless network device 20, first data is transmitted to the wireless network device 20 to be processed. When the wireless network device 20 receives the data from the terminal 10, the control circuit 24 controls the antenna 26 to convert the received data into radio signals so that the data from the terminal 10 can be wirelessly outputted. According to the IEEE 802.11 specification, a MAC service data unit (MSDU) is the fundamental unit for transmitting data. Therefore, during the period when the terminal 10 transmits data to the wireless network device 20, the terminal 10 first converts data into a plurality of MSDUs and then transmits the MSDUs to the wireless network device 20. Moreover, because of the noise of wireless communication, it is improper for the wireless network device 20 to transmit any MSDU having an excessively long data length. Thus, when the control circuit 24 detects too much noise of the communication environment, the control circuit 24 separates each received MSDU into a plurality of MAC protocol data units (MPDUs), each MPDU having a shorter data length than the MSDU. By using the MPDU format, data can be transmitted more easily.
Please refer to FIGS. 2-3. FIG. 2 shows how the wireless network device 20 shown in FIG. 1 converts a MSDU 28 received from the terminal 10 into a plurality of MPDUs 32a-32c. FIG. 3 is a flow chart showing how the wireless network device 20 processes the MSDU 28. The MSDU 28 comprises a plurality of pieces of frame data 30a-30c. The terminal 10 appends a header to the MSDU 28, where the header includes source MAC address and destination MAC address, along with other relevant data. When the wireless network device 20 receives the MSDU 28 from the terminal 10, the wireless network device 20 stores the received MSDU 28 in the buffer 22 (steps 40 and 42). While receiving the MSDU 28, the control circuit 24 of the wireless network device 20 determines whether all pieces of frame data 30a-30c of the MSDU 28 have been received completely (step 44). The wireless network device 20 will not stop receiving the MSDU 28 until the MSDU 28 has been completely received. After completely receiving the MSDU 28, if the control circuit 24 detects excessive noise in the communication environment, the control circuit 28 separates the MSDU 28 stored in the buffer 22 to generate a plurality of MPDUs 32a-32c according to corresponding pieces of frame data 30a-30c (step 46). For instance, the control circuit 24 respectively converts the pieces of frame data 30a, 30b, and 30c into MPDU 32a, MPDU 32b, and MPDU 32c. After the pieces of frame data 30a-30c are converted into MPDUs 32a-32c, the control circuit 24 controls the antenna 26 to transfer the MPDUs 32a-32c into corresponding radio signals and to output the radio signals (step 48). After the antenna outputs the radio signals, the transfer of the MSDU 28 is finished (step 50).
Please refer to FIG. 4, which is a timing diagram shows how the buffer 22 and control circuit 24 shown in FIG. 1 process the pieces of frame data 30a-30c. As shown in FIG. 3, the control circuit 24 does not convert any piece of frame data 30a-30c stored in the buffer 22 into the MPDUs 32a-32c until the control circuit 24 completely receives all the pieces of frame data 30a-30c of the MSDU 28. Therefore, if any piece of frame data 30a-30c is not received by the wireless network device 20, the control circuit 24 does not start to convert the pieces of frame data 30a-30c into MPDUs 32a-32c. As shown in FIG. 4, the control circuit 24 starts to convert the pieces of frame data 30a-30c into the MPDUs 32a-32c after all pieces of frame data 30a-30c of the MSDU 28 have been stored in the buffer 22. However, because the control circuit 24 does not separate the MSDU 28 into the MPDUs 32a-32c until the wireless network device completely receives the MSDU 28, the processing of the wireless network device 20 for transmitting MSDU 28 is limited.